//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	CamlQueryBuilderWhere.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

namespace Smart.Common.Entities
{
	/// <summary>
	/// Where group
	/// </summary>
	public class CamlQueryBuilderWhere<TExecutorType> : CamlQueryBuilderAnd<TExecutorType>, IQueryBuilderWhere<TExecutorType>
		where TExecutorType : class
	{
		public override string FormatQuery()
		{
			var query = base.FormatQuery();

			return
				query.IsNullOrEmpty()
					? string.Empty
					: "<Where>" + query + "</Where>";
		}
	}
}